package org.nhindirect.stagent;

import org.apache.commons.codec.binary.Base64;

public class Body extends EntityPart
{
    public Body(StringSegment body)
    {
    	super(EntityPartType.Body, body);
    }
    
    public Body(String body)
    {
    	super(EntityPartType.Body);
    	this.setText(body);
    }        
    
    public Body(byte[] body)
    {
        super(EntityPartType.Body);
    	this.setText(Base64.encodeBase64String(body));
    }
    
    protected Body(Body body)
    {
    	super(EntityPartType.Body, body.getSourceText());
    }
}
